/*
 * fni.locale.dateformat.FNITokenFormatterVault
 * Copyright (C) 2008 - 2009 Antti Leppä / Foyt
 * http://www.foyt.fi
 * 
 * License: 
 * 
 * Licensed under GNU Lesser General Public License Version 2.1 or later (the "LGPL") 
 * http://www.gnu.org/licenses/lgpl.html
 */

/**
 * Singleton class for holding token formatters
 * 
 * @constructor 
 */
fni.locale.dateformat.FNITokenFormatterVault = {
  /**
   * Registers new formatter
   * 
   * @param formatter {fni.locale.dateformat.FNITokenFormatter} formatter to be registered
   */
  register: function (formatter) {
    this._formatters.set(formatter.getToken(), formatter);
  },
  /**
   * Return all registered formatters
   * 
   * @type Hash
   * @returns hash map of registered formatters
   */
  getFormatters: function () {
    return this._formatters;
  },
  _formatters: new Hash()
};